<?php

	$id = intval($_GET['id']);
	$ep=cache_get_ep($id);
	$data=cache_get_anime($ep['anime_id']);
	$data['ep']=$ep;
	$data['ep']['data_tags']=tag2_link($data['name'],$data['ep']['thutu']);
	//$data['chuong_list']=cache_get_truyen_chuong_list($id,1);
 //get the loai truyen cung tac gia ----------
 //query facebook, udpate sau
 /*
	$fb=new shareCount(url_truyen($data['id'],$data['alias']));
	$count=$fb->get_fb();
	$db=new db;
	$db->connect();
	$db->nonquery("update truyen set likes=".$count['like']." , comments=".$count['comment']." where id=$id");
	$db->close();
	*/
// End get truyen cung tac gia-------

   	//Lay the loai 2, lay duoc list chuong, update view, update so chuong hien co,update view

	//HEADER TITLE,KEYWORD,DESCRIPION
	$data1['title']=encode($data['name'])." ".$ep['title']." | Xem anime Online |  Anime24h.vn";
	$data1['mota']=encode("Bạn đang xem ".$data['name']." ".$ep['title']." . ".$data['gioithieu']);
	$data1['keyword']=$data['ten'].",".$data['alias'].", doc truyen ".$data['ten'];

loadview('template/header',$data1);
loadview("truyen/view_ep",$data);


 //    loadview("template/right",$right);

?>